package com.hanxiaozhang.api.order.fegin;


import com.hanxiaozhang.api.order.fegin.fallback.OrderFeignClientFallbackFactory;
import com.hanxiaozhang.order.entity.Order;
import com.hanxiaozhang.result.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 功能描述: <br>
 * 〈UserFeignClient〉
 * 注释掉
 *
 * @Author:hanxinghua
 * @Date: 2020/7/19
 */
@FeignClient(name = "springcloud-provider-order",fallbackFactory = OrderFeignClientFallbackFactory.class)
public interface OrderFeignClient {

    @GetMapping("/order/{id}")
    Result findById(@PathVariable("id") Long id);


    @PostMapping("/order/save")
    Result save(@RequestBody Order order);

}
